 <%@ taglib prefix="s" uri="/struts-tags"  %>
 
<script type="text/javascript">  
$.unblockUI();
$().ready(function() {  
	   
	$('#add').click(function() {  
    return !$('#newUsersOutsideProject option:selected').remove().appendTo('#newUsersInsideProject');  
   });  
   
   $('#remove').click(function() {  
    return !$('#newUsersInsideProject option:selected').remove().appendTo('#newUsersOutsideProject');  
   });
}); 

function saveUsersInProject(idProyecto) {
	$('#newUsersInsideProject option').attr('selected','true');
	$.post('./project/saveUsersProject.action', $('#formUsuariosProyecto').serialize() ,function(resultadoHTML) {
		$('#content').html(resultadoHTML);
	});
}

</script>  
   
<div class="transferSelect">
<form id="formUsuariosProyecto" class="well form-inline">

	<s:hidden name="idProyecto"/>

	<s:select  multiple="true" list="usersOutsidePoject" listKey="id" listValue="name" name="newUsersOutsideProject" ></s:select>
	<label>
	<a href="#" id="add" class="btn btn-mini">&nbsp &nbsp Add<i class="icon-chevron-right"></i>&nbsp &nbsp</a><br>
	<a href="#" id="remove" class="btn btn-mini"><i class="icon-chevron-left"></i>Remove</a>
	</label>
	<s:select  multiple="true" list="usersInsideProject" listKey="id" listValue="name" name="newUsersInsideProject"></s:select>
	
	<a href="#" onclick="saveUsersInProject(<s:property value="idProyecto"/>)" class="btn btn-success">Save</a>  
	<a href="#" onclick="cancelAdduser()" class="btn">Cancel</a>
</form>	

	
</div>

